home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Aktuell
/
Amiga Aktuell.iso
/
searchtools
/
find.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-09-05
|
1KB
|
41 lines
/*ArexxFind (c) Frank Röchter*/
Say "You can specify more than one word by dividing them by a space character"
Say "Type in the words you want to search for:"
Pull find
if find~="" then do
find=upper(find)
Say "Please wait..."
open("I","Amiga-Aktuell-1:searchtools/"||ARG(1)||".qfind","READ")
t=time("S")
open("O","t:found"||t,"WRITE")
found=0
Writeln("O","Your word(s): "||find)
do while eof("I")=0
line=readln("I")
line2=upper(line)
W=words(find)
do while w>0
idx=index(line2,word(find,w))
if idx~=0 then do
w=w-1
if w=0 then do
if found=0 then do
Writeln("O","The following directorys contain your words:")
Writeln("O","")
found=1
end
Writeln("O",line)
end
end
if idx=0 then w=0
end
end
if found=0 then do
Writeln("O","Sorry, your word does not exist in any directory of this CD")
end
Close("I")
Close("O")
ADDRESS COMMAND "Amiga-Aktuell-1:c/Next t:found"||t
ADDRESS COMMAND "delete >nil: t:found"||t
end